{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('form');}
<form action="" method="post">
<div class="tools_bar clearfix">
    <a class="icon-checkbox-checked icon-checkbox-unchecked" href="javascript:;" onclick="tools_select('id[]',this)" title="全选" data="true"> 全选 </a>
    <a class="icon-delicious" href="{url:/customer/recharge_list}"> 全部记录</a>
    <a style="color:red;" href="{url:/customer/download_recharge_execl_file}">导出充值扣款记录</a>
    <span class="fr"><a href='javascript:;' id="condition" class="icon-search" style="" > 筛选条件</a><input id="condition_input" type="hidden" name="condition" value="{$condition}"></span>
</div>
充值总金额：<b style="color:red;">{$total_1}</b>&nbsp;&nbsp;&nbsp; 扣款总金额：<b style="color:red;">{$total_2}</b>
<table class="default" >
    <tr>
        <th>操作</th>
        <th>用户</th>
        <th>金额</th>
        <th>操作类型</th>
        <th>账户类型</th>
        <th>时间</th>
        <th>操作人</th>
            
    </tr>
    {query:name=recharge as wd fields=wd.*,us.name as uname join= inner join user as us on wd.user_id eq us.id key=$i where= $where id=$obj page=1 order=id desc pagesize=20 }
        <tr>
        <td style="width:70px" class="btn_min">{echo:$i+1}</td>
        <td>{$item['uname']}</td>
        <td {if:$item['type']==0}class="green"{else:}class="red"{/if}>{$item['je']}</td>
        <td>
        	{if:$item['type']==0}
        		<b class="green">充值</b>
        	{elseif:$item['type']==1}
        		<b class="red">扣款</b>
        	{/if}
        </td>
        <td>
        	{echo:Common::get_account_name($item['account_type'])}
        </td>
        <td >{$item['create_time']}</td>
        <td >{$item['admin']}</td>
        
        </tr>
    {/query}
</table>
</form>
<div class="page_nav">
{echo:$obj->pageBar()}
</div>
<script type="text/javascript">
    var form =  new Form();
    $("#condition").on("click",function(){
        $("body").Condition({input:"#condition_input",okVal:'高级搜索',callback:function(data){tools_submit({action:'{url:/customer/recharge_list}',method:'get'});},data:{'us.name':{name:'用户名'},'wd.name':{name:'账户名'},'type_name':{name:'名称'},account:{name:'账号'},amount:{name:'提现金额'},'wd.status':{name:'状态',values:{2:'失败',0:'待处理',1:'成功'}}
        }});
    });
    function withdrawAction(id)
    {
        art.dialog.open("{url:/customer/withdraw_view/id/}"+id,{id:'withdraw-dialog',title:"审批",width:620});
    }
    function close_dialog()
    {
        art.dialog({id:"withdraw-dialog"}).close();
        tools_reload();
    }
</script>
